package com.example.stuasist;

import com.example.stuasist.weather.MyWeather;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;

public class main_ui extends Activity {
	private TextView main_ui_tv_course = null;
	private ImageView main_ui_iv_weather = null;
	private ImageButton main_ui_ibtn_message = null;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE); // 去掉标题栏
		super.setContentView(R.layout.main_ui);
		this.main_ui_tv_course = (Button) findViewById(R.id.main_ui_tv_course);
		this.main_ui_tv_course.setOnClickListener(new OnClickListenerimp4()); // 设置单机事件监听
		this.main_ui_iv_weather = (ImageView) findViewById(R.id.main_ui_iv_weather);
		this.main_ui_iv_weather.setOnClickListener(new OnClickListenerimp5());
		this.main_ui_ibtn_message = (ImageButton) findViewById(R.id.main_ui_ibtn_message);
		this.main_ui_ibtn_message.setOnClickListener(new OnClickListenerimp7());
	}

	private class OnClickListenerimp4 implements OnClickListener { // 单击事件
		@Override
		public void onClick(View v) {
			Intent intent = new Intent(main_ui.this,
					MainActivity.class); // 实现页面跳转
			startActivity(intent);
		}
	}
	
	private class OnClickListenerimp5 implements OnClickListener { // 单击事件
		@Override
		public void onClick(View v) {
			Intent intent = new Intent(main_ui.this,
					MyWeather.class); // 实现页面跳转
			startActivity(intent);
		}
	}
	
	private class OnClickListenerimp7 implements OnClickListener { // 单击事件
		@Override
		public void onClick(View v) {
			Intent intent = new Intent(main_ui.this,
					email_login.class); // 实现页面跳转
			startActivity(intent);
		}
	}
}